//
//  ZFPlayerView.h
//
//  LajinLive
//
//  Created by 刘洋 on 2016/10/20.
//  Copyright © 2016年 lajin. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ZFPlayer.h"
#import "ZFPlayerModel.h"
#import "LJVideoNetStatusView.h"
#import <AVFoundation/AVFoundation.h>

@protocol LJZFPlayerDelegate <NSObject>
@optional
/** 下载视频 */
- (void)zf_playerDownload:(NSString *)downloadUrl;

@end

typedef void(^FullScreenBlock)(BOOL isFullScreen);
@class LJZFPlayerControlView;
@interface LJZFPlayerView : UIView <ZFPlayerControlViewDelagate>
/** 播放属性 */
@property (nonatomic, strong) AVPlayer               *player;
/** 是否为全屏 */
@property (nonatomic, assign) BOOL                   isFullScreen;
/** 视频model */
@property (nonatomic, strong) ZFPlayerModel          *playerModel;
/** 控制层View */
@property (nonatomic, strong) LJZFPlayerControlView  *controlView;
/** 是否被用户暂停 */
@property (nonatomic, assign) BOOL                   isPauseByUser;
/** 网络状态切换状态标识 */
@property (nonatomic, assign) LJVideoNetStatus       videoNetStatusing;
/** 从xx秒开始播放视频跳转 */
@property (nonatomic, assign) NSInteger              seekTime;
/** 代理方法 */
@property (nonatomic, assign) id<LJZFPlayerDelegate> delegate;
/** 全屏按钮点击block:全屏隐藏电量条 */
@property (nonatomic, copy) FullScreenBlock          fullScreenBlock;
/**
 *  自动播放，默认不自动播放
 */
- (void)autoPlayTheVideo;

/**
 *  播放
 */
- (void)play;

/**
 * 暂停
 */
- (void)pause;

@end
